package com.one.apartmentsystem.app.controller;

import com.one.apartmentsystem.app.service.PaymentManageService;
import com.one.apartmentsystem.app.vo.PageResultVO;
import com.one.apartmentsystem.app.vo.PaymentDetailsVO;
import com.one.apartmentsystem.common.utils.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 缴费页接口
 * @author mpk
 * @since 2024/8/18 18:52:56
 */
@RestController
@RequestMapping("/app/payment")
public class PaymentController {

    @Autowired
    PaymentManageService paymentManageService;

    /**
     * 查询未交费
     * @return
     */
    @GetMapping("/unpaid")
    public Result unpaid() {

        PageResultVO<PaymentDetailsVO> pageList=paymentManageService.unpaid();

        return Result.ok(pageList);
    }

    /**
     * 查询已缴费
     * @return
     */
    @GetMapping("/paid")
    public Result paid() {

        PageResultVO<PaymentDetailsVO> pageList=paymentManageService.paid();

        return Result.ok(pageList);
    }



}
